<?php
namespace app\common\model;

use think\Db;
use think\Model;

/**   YSF
 *    续费订单表  Model
 *    Date: 2018/8/21
 * Class RenewOrderModel
 * @package app\common\model
 */
class RenewOrderModel extends Model
{
    // 表名
    protected $dbName = 'renew_order';

    // 连表查询列表
    public function getJoinAll($where=[], $join=[], $limit=2, $field='a.*', $order='pay_time DESC')
    {
        $result = Db::name($this->dbName)
                ->alias('a')
                ->where($where)
                ->join($join)
                ->field($field)
                ->limit($limit)
                ->order($order)
                ->select();
        return $result;
    }

}